﻿using System;
using System.Runtime.Serialization;

namespace RayDen.Library.Entity.Frames {
    [Serializable]
    [DataContract]
    [KnownType(typeof(FrameParameter))]
    public class FrameParameter : FrameElement {
        [DataMember]
        public string Name;
        [DataMember]
        public Object Value;
        public Type ParamType { get; set; }

        [DataMember(Name = "ParamType")]
        private string DeviceTypeName {
            get { return ParamType == null ? null : ParamType.AssemblyQualifiedName; }
            set { ParamType = value == null ? null : Type.GetType(value); }
        }

    }
}